package main

import (
	"github.com/winc-link/hummingbird-modbus-rtu/config"
	"github.com/winc-link/hummingbird-modbus-rtu/internal/driver"
	"github.com/winc-link/hummingbird-sdk-go/service"
)

func main() {
	driverService := service.NewDriverService("official-modbus-rtu-v2")
	config.InitConfig(driverService)
	tcpDriver := driver.NewModbusRtuProtocolDriver(driverService)
	if err := driverService.Start(tcpDriver); err != nil {
		driverService.GetLogger().Error("driver service start error: %s", err)
		return
	}
}
